Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Controlling where DB transactions begin and end
You might find that for certain procedure types, you want to start or end database transactions in locations other than those WebSpeed automatically chooses. You know that WebSpeed automatically starts a database transaction for each iteration of four kinds of blocks:
A database transaction ends at the end of the transaction block or when the transaction is backed out for any reason.
Sometimes you want a database transaction to be larger or smaller depending on the amount of work you want undone in the event of an error. You can explicitly tell WebSpeed to start a database transaction by using the
TRANSACTIONoption with aDO,FOREACH, orREPEATblock header:When you explicitly tell WebSpeed to start a database transaction, it starts a transaction on each iteration of the block regardless of whether the block contains statements that directly update the database. Of course, WebSpeed does not start a database transaction if one is already active.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |